<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue.extend 扩展实例构造器</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
  <h1>vue.extend 扩展实例构造器</h1>
  <hr>
  <author></author>
  <div id="author"></div>
  
  <script type="text/javascript">
    var authorExtend = Vue.extend({
      template:"<p><a :href='authorURL' target='_blank'>{{authorName}}</a></p>",
      data:function(){
        return {
          authorName:'Adam',
          authorURL:"https://www.baidu.com"
        };
      }
    });
    new authorExtend().$mount("author");
    new authorExtend().$mount("#author");
  </script>
</body>
</html>